package s19.ch22.ex1;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class MyFirstSwingApp {

	public static void main(String[] args) {
		JFrame jFrame = new JFrame("My first swing app.");
		jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel jPanel = new JPanel();
		jFrame.add(jPanel);
				
		JLabel jLabel = new JLabel("Enter your age:");
		jPanel.add(jLabel);

		JTextField jTextField = new JTextField(10);
		jPanel.add(jTextField);
		
		JButton jButton = new JButton("OK");
		jPanel.add(jButton);
		
		jFrame.setSize(400, 200);
		jFrame.setVisible(true);
	}

}
